import request from '@/utils/request'

// 查询服务项列表
export function listService(query) {
  return request({
    url: '/system/service/list',
    method: 'get',
    params: query
  })
}

// 查询服务项详细
export function getService(id) {
  return request({
    url: '/system/service/' + id,
    method: 'get'
  })
}

// 新增服务项
export function addService(data) {
  return request({
    url: '/system/service/add',
    method: 'post',
    data: data
  })
}

// 修改服务项
export function updateService(data) {
  return request({
    url: '/system/service/',
    method: 'put',
    data: data
  })
}

// 删除服务项
export function delService(id) {
  return request({
    url: '/system/service/' + id,
    method: 'delete'
  })
}
export function saleOnService(id) {
  return request({
    url: '/system/service/saleOn/' + id,
    method: 'put'
  })
}
export function saleOffService(id) {
  return request({
    url: '/system/service/saleOff/' + id,
    method: 'put'
  })
}



export function serviceItemAuditInfo(params){
  return request({
    url: '/system/service/audit/' +params.id,
    method: 'get'
  });
}
//审核提交操作
export function serviceItemStartAudit(params) {
  return request({
    url: '/system/service/audit',
    method: 'put',
    data: params
  })
}
